package CSDN;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2025-04-28
 * Time: 23:28
 */
public class Test8 {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(()->{
            while (Thread.currentThread().isInterrupted()) {
//                try {
//                    Thread.sleep(3000);
//                } catch (InterruptedException e) {
//                    throw new RuntimeException(e);
//                }
            }
        });
//        thread.setDaemon(true);
        thread.start();
        thread.interrupt();
//        System.out.println(thread.isDaemon());
//        Thread.sleep(3000);
//        System.out.println(thread.isAlive());
    }
}
